package com.whx.yimixian.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by wencai2015 on 2016/10/18.
 */

public class MyMainAdapter extends FragmentPagerAdapter {

    private List<Fragment> mList;
    public void setData(List<Fragment> list){
        this.mList = list;
    }
    public MyMainAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public int getCount() {
        return mList.size();
    }
}
